Capturing data from a view in C#

Hello,

I try to get data from a view but seems that IBM have done everything to be impossible :)
So the task is quite simple, open Doors, select a module, load a view then do a export to Excel. All I want is to process data directly in C#, so no more export / import actions.

1. First of all, tried to use batch mode

doors.exe -osUser -b "C:\load_view.dxl"

Which works fine except will start a new process that I really don't know how to capture. Cout isn't working anymore (9.6) or at least, I can't figure out how to do it.

2. Second, I used both DOORSCOMLib or DXL library as imported COM objects but those are just rudimentary remote controls for Doors itself. If not opened, will open Doors, do some DXL then close.
Quite useless, at least for me.

3. Heard about C APIs but while reading some old threads, seems that those are for implementing another DXL like interpreter. Not sure how or if it's possible to use for connecting to server and get data.

 

Any help will be greatly appreciated!

 

 


RMalcovich - Tue Mar 07 12:27:30 EST 2017

Re: Capturing data from a view in C#
Mathias Mamsch - Wed Mar 08 07:31:17 EST 2017

1. To capture output you need to do two things

a) use cout instead of print

b) pass the "--nowait" (-w) parameter to DOORS to avoid a popup with the output instead of stdout.

2. Do not use COM if you do not need to, use batch. We had a lengthy discussion about how to start up a DOORS client from c# and automate it over com. Search for "c# beer mathias".

3. Not useful. You need to use DXL. If you are interested in an open source effort for a stable general purpose interface to get data in and out of DOORS I started a project called "DriveDOORS" a couple of years ago, but abandoned it because of missing time to develop it alone. If someone chimes in I can pick up the work.

Regards, Mathias

Re: Capturing data from a view in C#
RMalcovich - Wed Mar 08 07:51:22 EST 2017

Mathias Mamsch - Wed Mar 08 07:31:17 EST 2017

1. To capture output you need to do two things

a) use cout instead of print

b) pass the "--nowait" (-w) parameter to DOORS to avoid a popup with the output instead of stdout.

2. Do not use COM if you do not need to, use batch. We had a lengthy discussion about how to start up a DOORS client from c# and automate it over com. Search for "c# beer mathias".

3. Not useful. You need to use DXL. If you are interested in an open source effort for a stable general purpose interface to get data in and out of DOORS I started a project called "DriveDOORS" a couple of years ago, but abandoned it because of missing time to develop it alone. If someone chimes in I can pick up the work.

Regards, Mathias

Hello Mathias,

First of all, thank you for reply (and for all replies, I saw a lot of useful answers).
Indeed, I read all posts I could since search of this forum isn't so useful, outputting a lot of garbage.

1.

a) cout isn't working. Just like that. I use company license, Doors 9.6

b) -W is working but quite useless, if no "print" used, there will be no "another window"

2. COM is also useless. I see absolute no sense to start Doors remotely from C# since command line does the same thing

3. I was afraid of.. hmm.. why on earth somebody will need another interface???

 

I end up by using DXL from batch mode, triggered from C# as CMD process which is working fine. However, I use a file to capture exported data (I wrote a XML translation in DXL) and now working on C# part to detect when that file can be locked exclusive (detecting when done). This is in a BG worker since opening Doors module takes some time (over 18.000 records). (similar like you said in some old post)

Well, the project sounds nice, do you have  any webpage or something?

Thank you!

 

 

 

Re: Capturing data from a view in C#
Mathias Mamsch - Wed Mar 08 08:28:21 EST 2017

RMalcovich - Wed Mar 08 07:51:22 EST 2017

Hello Mathias,

First of all, thank you for reply (and for all replies, I saw a lot of useful answers).
Indeed, I read all posts I could since search of this forum isn't so useful, outputting a lot of garbage.

1.

a) cout isn't working. Just like that. I use company license, Doors 9.6

b) -W is working but quite useless, if no "print" used, there will be no "another window"

2. COM is also useless. I see absolute no sense to start Doors remotely from C# since command line does the same thing

3. I was afraid of.. hmm.. why on earth somebody will need another interface???

 

I end up by using DXL from batch mode, triggered from C# as CMD process which is working fine. However, I use a file to capture exported data (I wrote a XML translation in DXL) and now working on C# part to detect when that file can be locked exclusive (detecting when done). This is in a BG worker since opening Doors module takes some time (over 18.000 records). (similar like you said in some old post)

Well, the project sounds nice, do you have  any webpage or something?

Thank you!

 

 

 

a) cout works under DOORS 9.6, just tried it ...

D:\>echo cout ^<^< "Hallo" > test.dxl

D:\>type test.dxl
cout << "Hallo"

D:\>doors -d 35599@someserver -u someuser -P somepass -b D:\test.dxl --nowait > d:\test.txt

D:\>type test.txt
Hallo

2. The only reason why you would want to do that is to load a view, which you cannot easily do in batch mode. You will need interactive mode. 

3. IBM lock-in-strategy? 

The link to the project is https://github.com/domoran/DriveDOORS, but it is unfinished and would need some rewrite. The idea would be to have

- a stable network server that handles DOORS sessions (batch processes communicating with the server to execute DXL on demand)

- allows "server deployed DXL applications" (DXL-lets) to be run on the server (maybe with elevated credentials)

- allows the DXL-lets to have parameters / input data

- has a DXL interface to easily get data fast to and from DOORS (buffers, spreadsheets, tree structures, etc)

Technically this is not complicated - I just had the some weird ideas when I started the project, to not have external dependencies for the server part, etc. which do not make sense to me anymore. So I would like to make this fly, but I always feared that interest in it is not there anymore, since people stop using DOORS and go for newer PLM solutions.

Regards, Mathias